package com.zxy.lagouzuoye;

/**
 * @author zhangxuyuan
 * @version 1.0
 * @date 2020/10/24
 */
@Service(id = "second")
public class SecondComponent {

    @Autowired(id="first")
    private FirstComponent firstComponent=new FirstComponent();

    @Transaction
    public void testTransaction()
    {
        System.out.println("testTransaction");
    }

    public String getComponentId()
    {
        System.out.println("second");
        return "second";
    }

    @Override public String toString() {
        return "SecondComponent{" +
            "firstComponent=" + firstComponent +
            '}';
    }

}
